﻿
{$header}
<div id="main" class="main" >
    <div class="content">
  <h3 class="heading">编辑入库记录 [ <a href="__URL__">返回列表</a> ]</h3>
<div id="result" class="result none"></div>
<form class="form-horizontal well" method='post' id="form1" name="form1" action="__URL__/update/">
<p class="alert-error head">此功能暂未开发完全，请勿使用</p>
<table cellpadding=3 cellspacing=3 >
<tr>
    <td width="150px">入库单号：</td>
	<td class="tLeft" >
            <input  class="large" name="enter_no" value="{$vo.enter_no}">
        </td>
</tr>
    <tr>
    <td class="tRight" width="150px">按<b>条码</b>查询产品：</td>
	<td class="tLeft" >
            <input id="ptm" name="ptm_id" style="width:700px"></input>
            <br/><a class="btn btn-primary" href="javascript:void(0)" onclick="showdetail('ptm');">添加产品</a>
        </td>
</tr>
<tr>
	<td class="tRight" >按<b>拼音人工编码</b>查询产品：</td>
	<td class="tLeft" >
            <input id="ppy" name="ppy_id" style="width:700px"></input>
            <br/><a class="btn btn-primary" href="javascript:void(0)" onclick="showdetail('ppy');">添加产品</a>
        </td>
</tr>
<tr>
    <td class="tRight" >按<b>汉字</b>查询产品：</td>
    <td class="tLeft" >
            <div class="input-append">
                <input id="q" name="q" class="input-xlarge search-query" placeholder="搜索"><input id="hz" name="hz_id" type="hidden"></input>
                <button class="btn" type="button" onclick="filter()"><i class="icon-search"></i>搜索</button>
                <span class="help-inline alert">支持空格查询,如:名称 + 度数</span>
            </div>
            <br/><a class="btn btn-primary" href="javascript:void(0)" onclick="showdetail('hz');">添加产品</a>
        </td>
</tr>
<tr>
	<td class="tRight">选择的产品：</td>
        <td class="tLeft">
            <table id="chosed_product" name="ptable" class="table table-bordered table-striped">
                <thead><tr><th width="85px">条码</th><th width="200px">名称</th><th width="75px">生产批号</th><th width="75px">截止有效期</th><th>供应商</th><th>进价</th><th>数量</th><th>单位</th><th>删除</th></tr></thead>
               <volist name="enter_details" id="detail">
               	<tr>
               		<td><input type="hidden" name="product_id[]" value="{$detail.product_id}"> {$detail.tm}</td>
               		<td><p class="span3">{$detail.name}</p></td>
               		<td><input type="text" class="input-small" name="lot[]" value="{$detail.lot}"></td>
               		<td><input type="text" class="input-small" name="exp[]" value="{$detail.exp}"></td>
               		<td>{:modList('Supplier',$detail['supplier_id'],'span2','supplier_id[]' )} </td>
               		<td><input type="text" class="input-mini" name="enter_price[]" value="{$detail.enter_price}"></td>
               		<td><input type="text" class="input-mini" name="number[]" value="{$detail.number}"></td>
               		<td class="span1">{$detail.unit_id|getModelName='Unit'}</td>
               		<td class="span1"><img src="__PUBLIC__/images/publish_x.png" alt="删除" onclick="removerow(this);"></td>
               	</tr>
               </volist>
            </table>
        </td>
</tr>
<tr>
	<td class="tRight" >经办人：</td>
	<td class="tLeft" >
            <select name="user_id">
                <volist name="users" id="us">
                <option value="{$key}" <eq name="_SESSION[C('USER_AUTH_KEY')]" value="$key">selected</eq> >{$us}</option>
                </volist>
            </select>
            仓库：<select name="warehouse_id">
                <volist name="warehouses" id="ue">
                <option value="{$key}">{$ue}</option>
                </volist>
            </select>
        </td>
</tr>
<tr>
	<td class="tRight">备注：</td>
        <td class="tLeft"><textarea class="span12" name="remark" rows="4"></textarea>
        </td>
</tr>
<tr>
	<td></td>
	<td class="center" width="300">
        <input type="hidden" value="{$vo.id}" name="id">
	<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 保存</button>
	<button type="reset" onclick="javascript:history.back()" class="btn btn-primary offset1"><i class="icon-arrow-left icon-white"></i> 返回</button>
	</td>
</tr>
</table>
</form>
</div>
</div>
<include file="Public:footer" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/easyui/themes/default/easyui.css">
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/filter-product.js"></script>
<load href="__PUBLIC__/Js/My97DatePicker/WdatePicker.js" />
